package com.grass.p019lv.game.view;

import android.app.Dialog;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.fragment.app.DialogFragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;
import com.androidsa.bttsddka.R;

/* renamed from: com.grass.lv.game.view.LoadingDialog */
public class LoadingDialog extends DialogFragment {
    String hint;
    TextView tv_hint;

    public static LoadingDialog newInstance() {
        Bundle bundle = new Bundle();
        LoadingDialog loadingDialog = new LoadingDialog();
        loadingDialog.setArguments(bundle);
        return loadingDialog;
    }

    @Override // androidx.fragment.app.Fragment
    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        return layoutInflater.inflate(R.layout.dialog_loading_layout, viewGroup, false);
    }

    @Override // androidx.fragment.app.DialogFragment
    public Dialog onCreateDialog(Bundle bundle) {
        DialogC30501 r3 = new Dialog(getActivity(), R.style.ForceUpdateAppDialog) {
            /* class com.grass.p019lv.game.view.LoadingDialog.DialogC30501 */

            public void onBackPressed() {
            }
        };
        r3.setCancelable(false);
        r3.setCanceledOnTouchOutside(false);
        return r3;
    }

    @Override // androidx.fragment.app.Fragment
    public void onViewCreated(View view, Bundle bundle) {
        super.onViewCreated(view, bundle);
        this.tv_hint = (TextView) view.findViewById(R.id.tv_hint);
    }

    @Override // androidx.fragment.app.Fragment, androidx.fragment.app.DialogFragment
    public void onActivityCreated(Bundle bundle) {
        super.onActivityCreated(bundle);
        if (!TextUtils.isEmpty(this.hint)) {
            this.tv_hint.setText(this.hint);
        }
    }

    public void setData(String str) {
        this.hint = str;
    }

    @Override // androidx.fragment.app.DialogFragment
    public void show(FragmentManager fragmentManager, String str) {
        FragmentTransaction beginTransaction = fragmentManager.beginTransaction();
        beginTransaction.add(this, str);
        beginTransaction.commitAllowingStateLoss();
    }

    @Override // androidx.fragment.app.DialogFragment
    public void dismiss() {
        dismissAllowingStateLoss();
    }
}
